#! /bin/sh
currentDir=$(dirname $0)
imagePath1=$1
echo "param:" $imagePath
newName=`date +%s.png`
gitServer="https://gitee.com/huang_wen_shuo/typora-images"
cp "$imagePath1" "$currentDir/$newName"
cd "$currentDir"
git add $newName
git commit $newName -m 'upload file '
git push
echo "$gitServer/$newName"
